const activity = {
  state: {// 如何调用？在组件computed中 用this.$store.state.activity.kind 赋值给自有变量
    kind: '' // 保存活动的类型
  },
  mutations: {
    CHANGE_KIND: (state, val) => {
      state.kind = val
    }
  },
  actions: { // 调用这里去触发mutations，如何调用？在组件内使用this.$store.dispatch('action中对应名字', 参数)
    changeKind({ commit, state }, val) { // 异步操作 改变kind后传回去并用.then进行操作
      return new Promise(resolve => {
        commit('CHANGE_KIND', val)
        resolve({ kind: state.kind })
      })
    }
  }
}
export default activity
